Frappé: Functional Reactive Programming in Java
نویسنده
چکیده
Functional Reactive Programming (FRP) is a declarative programming model for constructing interactive applications based on a continuous model of time. FRP programs are described in terms of behaviors (continuous, timevarying, reactive values), and events (conditions that occur at discrete points in time). This paper presents Frappé, an implementation of FRP in the Java progamming language. The primary contribution of Frappé is its integration of the FRP event/behavior model with the Java Beans event/property model. At the interface level, any Java Beans component may be used as a source or sink for the FRP event and behavior combinators. This provides a mechanism for extending Frappé with new kinds of I/O connections and allows FRP to be used as a high-level declarative model for composing applications from Java Beans components. At the implementation level, the Java Beans event model is used internally by Frappé to propagate FRP events and changes to FRP behaviors. This allows Frappé applications to be packaged as Java Beans components for use in other applications, and yields an implementation of FRP well-suited to the requirements of event-driven applications (such as graphical user interfaces).
منابع مشابه
Feature-Oriented Functional Reactive Programming
This report describes an implementation of a functional reactive programming extension to Java implemented using the feature-oriented Jakarta Tool Suite. I explore the connection between feature-oriented programming and domain specific languages by demonstrating how this domain-specific language is both implemented and used in a feature-oriented system.
متن کاملHarmonizing Signals and Events with a Lightweight Extension to Java
The current demands for seamless connections with the surrounding environment make software more reactive. For example, such demands are evident in systems consisting of the Internet of Things. Such systems include a set of reactive values that are periodically updated in response to external or internal events to form a dataflow in the sense that such updates are propagated to other reactive v...
متن کاملFunctional Reactive Programming with Liveness Guarantees As relations are to set-valued functions, so event sources are to behaviours
Functional Reactive Programming (FRP) is an approach to the development of reactive systems which provides a pure functional interface, but which may be implemented as an abstraction of an imperative event-driven layer. FRP systems typically provide a model of behaviours (total time-indexed values, implemented as pull systems) and event sources (partial time-indexed values, implemented as push ...
متن کاملThe Potential of Tropical Agro-Industrial by-Products as a Functional Feed for Poultry
Following the ban of synthetic antibiotics as antimicrobial agents and growth promoters, poultry nutritionists are now trying to find antibiotic substitutes. Agro-industrial by-products are abundant in tropical countries and have been used as the alternatives to conventional feedstuffs in poultry rations. These by-products are also known to contain several bioactive compounds such as oligosacch...
متن کاملIntegrating data-parallel and reactive constructs into Java
We introduce the EPP extensible preprocessor and explain how it permits to integrate new constructs into the Java language in a modular way. We present experiments of data-parallel frameworks and reactive objects programming realized with this system.
متن کامل